Ext.app.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
    initComponent : function(){
        Ext.app.SearchField.superclass.initComponent.call(this);
        this.on('specialkey', function(f, e){
            if(e.getKey() == e.ENTER){
                this.onTrigger2Click();
            }
        }, this);
    },

    validationEvent:false,
    validateOnBlur:false,
    trigger1Class:'x-form-clear-trigger',
    trigger2Class:'x-form-search-trigger',
    hideTrigger1:true,
    emptyText:'在名字域搜索请直接输入关键字，关键字之间用空格隔开...更详细的搜索请直接点击右边按钮...',
    width:180,
    hasSearch : false,
    paramName : 'query',
    onTrigger1Click : function(){
            this.el.dom.value = '';
    },

    onTrigger2Click : function(){
       createSearchFormWin(this.el.dom.value);
    }
});
